//
//  RMMSetPasswordView.m
//  Romomo
//
//  Created by puman on 2016/10/19.
//  Copyright © 2016年 mazegong. All rights reserved.
//

#import "RMMSetPasswordView.h"

@implementation RMMSetPasswordView
- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = kCColor;
        NSArray *array = @[@"新密码",@"确认新密码"];
        NSArray *plArr = @[@"请输入新密码",@"请再次输入新密码"];
        for (int i = 0; i < 2; i++) {
            UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 16 + 55 * i, kScreenWideth, 54)];
            view.backgroundColor = kWhiteColor;
            [self addSubview:view];
            
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, 90, view.height)];
            label.text = array[i];
            label.textColor = COLORFROMCODE(0x2C2C2C, 1);
            label.font = kFont(16);
            [view addSubview:label];
            
            UITextField *textF = [[UITextField alloc] initWithFrame:CGRectMake(label.right + kRow, 0, view.width - label.right - kRow, view.height)];
            textF.font = kFont(14);
            textF.secureTextEntry = YES;
            textF.clearButtonMode = UITextFieldViewModeWhileEditing;
            textF.placeholder = plArr[i];
            [view addSubview:textF];
            if (i == 0) {
                _password = textF;
            } else {
                _passwordAgin = textF;
            }
            
        }
        
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(15, 125 , kScreenWideth - 30, 40)];
        label.textColor = COLORFROMCODE(0x9B9B9B, 1);
        label.font = kFont(13);
        label.numberOfLines =0;
        label.text = @"密码由6-20位字符的字符和数字组成";
        [self addSubview:label];
    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
